package aaa;

import javax.swing.*;
import java.awt.*;

public class aaa {
    public static void main(String[] args) {
        JFrame jf=new JFrame("测试窗口");
        jf.setSize(200,250);
        jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        jf.setLocationRelativeTo(null);
        JPanel panel=new JPanel(new FlowLayout());
        GroupLayout layout=new GroupLayout(panel);
        panel.setLayout(layout);
        JButton bt01=new JButton("石头");
        JButton bt02=new JButton("剪刀");
        JButton bt03=new JButton("布");
        layout.setAutoCreateGaps(true);
        layout.setAutoCreateContainerGaps(true);
        GroupLayout.ParallelGroup hParalGroup01=layout.createParallelGroup().addComponent(bt01).addComponent(bt02);
        GroupLayout.ParallelGroup hParalGroup02=layout.createParallelGroup().addComponent(bt03).addComponent(bt03);
        GroupLayout.SequentialGroup  hSeqGroup=layout.createSequentialGroup().addGroup(hParalGroup01).addGroup(hParalGroup02);
        panel.add(bt01);
        panel.add(bt02);
        panel.add(bt03);
        jf.setContentPane(panel);
        jf.pack();
        jf.setLocationRelativeTo(null);
        jf.setVisible(true);
    }


}
